﻿@model S4Store.Models.Car.CarModelListPage
@{
    ViewBag.Title = "Index";
    Layout = null;
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
}
<div class="listpage verticalSplitContainer" style="height:100%;">
    <form method="post" action="@Url.Action("Query")" ratio="#65">
    <div class="querybar">
        <table class="querytable">
            <tbody><tr>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">车款名称：</span><input type="text" name="Name" class="textInput">
                           </div>
                       </td>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">品牌：</span>
                               <select name="PinPaiId" class="">
                                   <option value="">所有品牌</option>
                                   @foreach (var pinpai in Model.PinPai)
                                   {
                                       <option value="@pinpai.Id">@pinpai.Name</option>
                                   }
                               </select>
                           </div>
                       </td>
                       <td>
                           <div class="queryitem">
                               <span class="querytitle">车型：</span>
                               <select name="BrandId" class="">
                                   <option value="">所有车型</option>
                                   @foreach (var store in Model.Brands)
                                   {
                                       <option value="@store.Id">@store.Name</option>
                                   }
                               </select>
                           </div>
                       </td>
                   </tr>
            </tbody></table>
        <div class="querybuttonbar">
            <div class="simplebutton"><div class="r"><button type="button" class="submit">检索</button></div></div>
        </div>
        <div class="clear"></div>
    </div>
    </form>    

@if (CurrentUser.Position == S4Store.Domain.Position.SystemManager)
{
        <div class="panelBar"  ratio="#25">
            <ul class="toolBar">
                
                    <li class=""><a target="dialog" href="@Url.Action("Add")" backtype="html" refreshonclose="true"><span class="icon add">添加车款</span></a></li>
                
                    <li class=""><a target="dialog" href="@Url.Action("Modify")" backtype="html" refreshonclose="true" beforechk="link.onlySelectOne()"  postdata="{id:link.getSelectid()}"><span class="icon edit">修改车款</span></a></li>
               
                   @* <li class=""><a confirm="确定要删除吗?" target="ajax" href="@Url.Action("Delete")" backtype="refresh" postdata="{ids:link.getSelectids()}"  refreshonclose="true"><span  class="icon delete">删除车型</span></a></li>*@
                
                    <li class=""><a target="ajax" href="@Url.Action("Upline")" backtype="refresh" postdata="{ids:link.getSelectids()}"  refreshonclose="true"><span  class="icon up">上线</span></a></li>
                    <li class=""><a target="ajax" href="@Url.Action("Downline")" backtype="refresh" postdata="{ids:link.getSelectids()}"  refreshonclose="true"><span  class="icon down">下线</span></a></li>
                
            </ul>
        </div>
    }
    <div  ratio="*" class="verticalSplitContainer dataRefresh">
        @Html.Action("Query")
    </div>
</div>